Magellan/windows - fix crash opening non-existent file.
# type that is XML-ish (i.e. gpx or geocaching.com's/loc) you can uncomment
# INHIBIT_EXPAT and coment out LIBEXPAT on just to get a build working quickly.
# INHIBIT_EXPAT=-DNO_EXPAT
-LIBEXPAT=-lexpat # -lefence
+LIBEXPAT=-lexpat #-lefence
#
# Enable either or both of these as you wish.
(echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > $@ || (rm -f $@ ; exit 1)' ) >> /tmp/dep
echo Edit Makefile and bring in /tmp/dep
-VERSIONU=1_2_1_beta01312004
-VERSIOND=1.2.1_beta01312004
+VERSIONU=1_2_2_beta02152004
+VERSIOND=1.2.2_beta02152004
#VERSIONU=1_2_1
#VERSIOND=1.2.1
OPEN_EXISTING, 0, NULL);
if (comport == INVALID_HANDLE_VALUE) {
- is_file = 1;
- return 0;
+ goto try_as_file;
}
tio.DCBlength = sizeof(DCB);
GetCommState (comport, &tio);
/*
* Probably not a com port. Try it as a file.
*/
+try_as_file:
magfile_in = xfopen(portname, "rb", MYNAME);
is_file = 1;
icon_mapping = map330_icon_table;
FILE *f;
int am_writing = strchr(type, 'w') != NULL;
+ if (fname == NULL) {
+ fatal("%s must have a filename specified for %s.\n",
+ errtxt, am_writing ? "write" : "read");
+ }
+
if (0 == strcmp(fname, "-"))
return am_writing ? stdout : stdin;
f = fopen(fname, type);